using UnityEngine;

namespace Gj
{
    public class CurveAnimationHelper : SimpleAnimationHelper
    {
        public AnimationCurve x;
        public AnimationCurve y;
        public AnimationCurve z;

        protected override Vector3 GetValue(float t)
        {
            return new Vector3(MathTools.Lerp(start.x, end.x, x.Evaluate(t)),
                MathTools.Lerp(start.y, end.y, y.Evaluate(t)), MathTools.Lerp(start.z, end.z, z.Evaluate(t)));
        }
    }
}